//
//  AddHeaderView.m
//  DaiShengInvest
//
//  Created by 张睿 on 2017/7/4.
//  Copyright © 2017年 davinci. All rights reserved.
//

#import "AddHeaderView.h"

@interface AddHeaderView ()

@property (nonatomic, strong)UISearchBar * searchBar;

@end

@implementation AddHeaderView



- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
        //在这里向contentView添加控件
        [self setupUI];
    }
    return self;
}



- (void)setupUI{
    
    self.searchBar = [[UISearchBar alloc] init];
    
    self.searchBar.barStyle = UIBarStyleBlack;
    self.searchBar.placeholder = @"搜索";
    self.searchBar.tintColor = ColorWithRGB(0x666666);
    [self.searchBar setTranslucent:YES];
    
    [self addSubview:self.searchBar];
    
    [self.searchBar mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.bottom.top.mas_equalTo(self);
    }];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
